import React from 'react';
import { connect } from 'react-redux'
// import { bindActionCreators } from 'redux'
// import * as actions from './module'
// import { actions } from './module'

interface IPros {
  getInitTest: any,
  dispatch: any
}

const BindDemo: React.FC<IPros> = (props) => {
  // console.log(props, 'props')
  const { dispatch } = props;
  return (
    <div>
      <h1 onClick={() => {
        // dispatch(props.getInitTest())
        // dispatch(action.getInitTest())
      }}>actions creator</h1>
    </div>
  )
}

export default connect((state) => {
  return { ...state }
}, (dispatch) => {
  // return bindActionCreators(actions, dispatch)
  return { dispatch }
})(BindDemo);